package com.editso.haier.configure;


import com.editso.haier.result.ResultCode;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

public class ResultCodeConvert extends JsonSerializer<ResultCode> {

    @Override
    public void serialize(ResultCode resultCode, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeNumber(resultCode.getCode());
    }
}
